<!DOCTYPE html>
<html ng-app="myApp">

	<head>
		<meta charset="UTF-8">
		<title>controller</title>
		<script type="text/javascript" src="../angular.js"></script>
	</head>

	<body>
		<div ng-controller="usercontroller">
			<input type="text" id="text" ng-model="user.name" />
			<span>{{user.name}}</span>
		</div>
		<script type="text/javascript">
			var app = angular.module('myApp', []);
			app.controller("usercontroller",function($scope){
				$scope.user={
					name:"张三"
				}
			});
		</script>
	</body>

</html>